package com.sy.controller;

import com.sy.dto.JsonResult;
import com.sy.sevice.HomeworkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JianBo-Sheng
 * @version 1.0
 * @date 2020/9/14 0011 11:00
 * @usage 作业类相关的控制器
 */
@RestController
@RequestMapping("homeworks")
public class HomeworkController {

    @Autowired
    private HomeworkService homeworkService;
    /**
     * 所有作业信息
     * @return JsonResult对象
     */
    @RequestMapping(value = "",method = RequestMethod.GET)
    public JsonResult selectAll(){
        return homeworkService.selectAll();
    }

}
